package com.fst.dsi.lib.domain.entity;

import java.io.Serializable;
import javax.persistence.*;

import com.dnr.arch.kernel.model.AbstractValue;
import com.dnr.arch.kernel.model.Value;

import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the publisher database table.
 * 
 */
@Entity
@Table(name="publisher")
public class Publisher extends AbstractValue implements Serializable, Value {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="id_", unique=true, nullable=false)
	private String id;

	@Column(name="creationdate_", nullable=false)
	private Timestamp creationDate;

	@Column(name="creatoruserid_", nullable=false)
	private int creatorUserId;

	@Column(name="name_", nullable=false)
	private String name;

	//bi-directional many-to-one association to Book
	@OneToMany(mappedBy="publisher")
	private List<Book> books;

    public Publisher() {
    }

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Timestamp getCreationdate() {
		return this.creationDate;
	}

	public void setCreationdate(Timestamp creationdate) {
		this.creationDate = creationdate;
	}

	public int getCreatoruserid() {
		return this.creatorUserId;
	}

	public void setCreatoruserid(int creatoruserid) {
		this.creatorUserId = creatoruserid;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Book> getBooks() {
		return this.books;
	}

	public void setBooks(List<Book> books) {
		this.books = books;
	}
	
}